package com.squirrel.common.param.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @Description LoginParam 用户登录参数
 * @Author 关远键
 * @Version v1.0.0
 * @Date 2021/11/10 14:48
 */
@Data
@ApiModel("登录参数")
public class LoginParam {

    @ApiModelProperty(value = "邮箱或手机号", required = true)
    @NotBlank(message = "邮箱或手机号不能为空")
//    @Pattern(regexp = "^[A-Za-z0-9\\u4e00-\\u9fa5]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$", message = "邮箱格式错误")
    private String mailOrPhone;

    @ApiModelProperty(value = "密码", required = true)
    @NotBlank(message = "密码不能为空")
    private String password;

}
